package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLSoundManager;
import HLLib.base.HLString;

public class HLClassSoundManager extends HLLibClass {
    public HLClassSoundManager(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLSoundManager();
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            HLSoundManager.PreloadBackgroundMusic((HLString)args.GetObject(0));
            break;
        }
        case 1: {
            HLSoundManager.PlayBackgroundMusic((HLString)args.GetObject(0));
            break;
        }
        case 2: {
            HLSoundManager.PlayBackgroundMusicWithLoop((HLString)args.GetObject(0), args.GetInt(0));
            break;
        }
        case 3: {
            HLSoundManager.StopBackgroundMusic();
            break;
        }
        case 4: {
            HLSoundManager.PauseBackgroundMusic();
            break;
        }
        case 5: {
            HLSoundManager.RestartBackgroundMusic();
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                HLSoundManager.IsBackgroundMusicPlaying();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, HLSoundManager.IsBackgroundMusicPlaying());
            }
            break;
        }
        case 7: {
            if (resultOwnerObject == null) {
                HLSoundManager.WillBackgroundMusicPlaying();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, HLSoundManager.WillBackgroundMusicPlaying());
            }
            break;
        }
        case 8: {
            HLSoundManager.PreloadEffect((HLString)args.GetObject(0));
            break;
        }
        case 9: {
            if (resultOwnerObject == null) {
                HLSoundManager.PlayEffect((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLSoundManager.PlayEffect((HLString)args.GetObject(0)));
            }
            break;
        }
        case 10: {
            if (resultOwnerObject == null) {
                HLSoundManager.PlayEffectWithPitchPanGain((HLString)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLSoundManager.PlayEffectWithPitchPanGain((HLString)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2)));
            }
            break;
        }
        case 11: {
            HLSoundManager.StopEffect(args.GetInt(0));
            break;
        }
        case 12: {
            HLSoundManager.UnloadEffect((HLString)args.GetObject(0));
            break;
        }
        case 13: {
            HLSoundManager.SetMute(args.GetBoolean(0));
            break;
        }
        case 14: {
            if (resultOwnerObject == null) {
                HLSoundManager.GetBackgroundMusicVolume();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLSoundManager.GetBackgroundMusicVolume());
            }
            break;
        }
        case 15: {
            HLSoundManager.SetBackgroundMusicVolume(args.GetInt(0));
            break;
        }
        case 16: {
            if (resultOwnerObject == null) {
                HLSoundManager.GetEffectsVolume();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLSoundManager.GetEffectsVolume());
            }
            break;
        }
        case 17: {
            HLSoundManager.SetEffectsVolume(args.GetInt(0));
            break;
        }
        }
    }
}
